const { carpoolReport } = require('./data/carpools')
const base = '/shopmovie'

module.exports = [{
  url: `${base}/players/cs/report`,
  type: 'post',
  response: config => {
    // 这里使用拼车统计数据,只为展示
    let { orgUnitId, status, confirmed } = config.body
    const { start, end } = config.body
    orgUnitId = orgUnitId ? parseInt(orgUnitId) : null
    status = status ? parseInt(status) : null
    confirmed = confirmed ? parseInt(confirmed) : null
    const item = carpoolReport({ orgUnitId, status, confirmed, start, end })
    return { success: true, data: item }
  }
}]
